// 在 app/layout.tsx 中添加导航
import Link from "next/link";
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="zh">
      <body>
        <nav className="bg-white shadow-sm">
          <div className="container mx-auto px-4 py-3">
            <div className="flex justify-between items-center">
              <Link href="/" className="text-xl font-bold text-gray-800">
                投票系统
              </Link>
              <div className="space-x-4">
                <Link href="/" className="text-gray-600 hover:text-gray-800">
                  投票
                </Link>
                <Link href="/results" className="text-gray-600 hover:text-gray-800">
                  结果
                </Link>
              </div>
            </div>
          </div>
        </nav>
        {children}
      </body>
    </html>
  );
}